﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyMusicPlay._4._0
{
    public static class StringExtend
    {
        public static int GetEnumIndex<T>(this String str) where T : Enum
            => typeof(T).GetEnumNames().ToList().IndexOf(str);
    }
}
